package com.hyperf.event.client.annotation;

import org.springframework.context.annotation.Bean;
import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.*;

/**
 * @author lizhaoyang
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD, ElementType.METHOD})
@Bean
public @interface EventListener {

    @AliasFor(annotation = Bean.class)
    String[] value() default {};

    /**
     * Service version, default value is empty string
     */
    String version() default "";

    /**
     * Timeout value for service invocation, default value is 0
     */
    int timeout() default 0;
}
